The Movie Toolbox now fully supports a media that refers to data in more than one file. In the past, a media was restricted to a single data file. By allowing a single media to refer to more than one file, the Movie Toolbox allows better playback performance and easier editing, primarily by reducing the number of tracks in a movie. Use the new SetMediaDefaultDataRefIndex function SetMediaDefaultDataRefIndex to control which of a media's files you access when you add new sample data.
QuickTime 2.0 introduced support for timecode tracks. Timecode tracks allow you to store external timecode information, such as SMPTE timecode, in your QuickTime movies. QuickTime now provides a new timecode media handler that interprets the data in these tracks.
See "Timecode Media Handler Functions" for information about these functions.
While QuickTime has always allowed the creation of movies that contain more than one track, it has not been able to specify relationships between those tracks. Track references are a new feature of QuickTime that allow you to relate a movie's tracks to one another. The QuickTime track-reference mechanism supports many-to-many relationships. That is, any movie track may contain one or more track references, and any track may be related to one or more other tracks in the movie.
Track references can be useful in a variety of ways. For example, track references can be used to relate timecode tracks to other movie tracks. (See "Timecode Media Handler" for more information about timecode tracks.) You might consider using track references to identify relationships between video and sound tracks, identifying the track that contains dialog and the track that contains background sounds, for example. Another use of track references is to associate one or more text tracks that contain subtitles with the appropriate audio track or tracks.
Every movie track contains a list of its track references. Each track reference identifies another, related track. That related track is identified by its track identifier. The track reference itself contains information that allows you to classify the references by type. This type information is stored in an OSType data type. You are free to specify any type value you want. Note, however, that Apple has reserved all lower-case type values.
You may create as many track references as you want, and you may create more than one reference of a given type. Each track reference of a given type is assigned an index value. These index values start at 1 for each different reference type. The Movie Toolbox maintains these index values so that they always start at 1 and count by 1.
See "Working With Track References" for detailed descriptions of the Movie Toolbox functions that allow you to work with track references.
The addition of modifier tracks in QuickTime 2.1 introduced new capabilities for creating dynamic movies. For example, instead of playing video in a normal way, a video track can send its image data to a sprite track. The sprite track then uses that video data to replace the image of one of its sprites. When the movie is played, the video track appears as a sprite.
Modifier tracks are not a new type of track. Instead, they are a new way of using the data in existing tracks. A modifier track does not present its data, but instead sends it to another track which uses the data to modify how it presents its own data. Any track can be either a sender or a presenter, but not both. Previously, all tracks were presenters.
Another use of modifier tracks is to store a series of sound volume levels. These sound levels can be sent to a sound track as it plays to dynamically adjust the volume. A similar use of modifier tracks is to store location and size information. This data can be sent to a video track to cause it to move and resize as it plays.
Because a modifier track can send its data to more than one track, you can easily synchronize actions between multiple tracks. For example, a single modifier track containing matrices as its samples can make two separate video tracks follow the same path.
See "Creating Movies With Modifier Tracks" for more information about using modifier tracks. See "Media Handlers: Tween Media Handler Components" for more information.
A modifier track may cause a track to move outside of its original bounds. This may present problems, since applications do not expect the dimensions or location of a QuickTime movie to change over time.
To ensure that a movie maintains a constant location and size, the Movie Toolbox limits the area a spatially modified track can be displayed in. A movie's "natural" shape is defined by the region returned by GetMovieBoundsRgn . The Movie Toolbox clips all spatially modified tracks against the region returned by GetMovieBoundsRgn . This means that a track can move outside of its initial bounds, but it cannot move beyond the combined initial bounds of all tracks in the movie. Areas uncovered by a moving track are handled by the Movie Toolbox in the same way as areas uncovered by tracks with empty edits.
For more information about how QuickTime handles uncovered areas, see the description of the SetMovieCoverProcs function on page 2-156 of Inside Macintosh: QuickTime.
If a track has to move through a larger area than that defined by the movie's bounds region, the movie's bounds region can be enlarged to any desired size by creating a spatial track (such as a video track) of the desired size but with no data. As long as the track is enabled, it will contribute to the bounds of the movie.
The following media handlers support sending their data to other tracks: Video, Base, and Tween.
The Sound, Music and 3D media handlers do not support sending their data to other tracks.
Not all media handlers support all input types. Media handlers can decide which input types to support. Table 1-1 lists the input types supported by each Apple-supplied media handler:
Table 1Input Types Supported by Each Apple-supplied Media Handler